{include file="common/head"/}


<body>
<div class="header">
    <div class="nav-user lang" >
        <a href="#" data-lang="en-us" data-href="{:U('user/index/changeLang')}" class="_changeLang"><span class="en-us"></span>ENGLISH</a>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="#" data-lang="zh-tw" data-href="{:U('user/index/changeLang')}" class="_changeLang">中文</a>
    </div>
</div>
<div class="lp-pom-block-8">
    <div class="wap-main">
        <div class="layui-col-xs6 bock-left">
            <div id="lp-pom-blocklogo">
                <img src="__STATIC__/user/images/logox.png">
            </div>
            <div class="lp-element lp-pom-text nlh" id="" >
                {:lang('Bridging & Connecting Enterprise Clouds Anywhere, Anytime')}
            </div>
        </div>
        <div class="layui-col-xs6">
            <div class="layui-form beg-login-main">
                <form class="layui-form layui-form-pane fields" method="post">
                    <input type="hidden" name="captcha" value="0" id="_captcha" />
                     <div class="layui-form-item">
                        <label class="beg-login-icon fs1">
                            <span class="icon cloud-title"><img src="__STATIC__/user/images/logo.png" ></span>
                        </label>
                    </div>
                    <br/>
                    <div class="layui-form-item">
                        
                        <input type="text" name="email" lay-verify="required" autocomplete="off" placeholder="{:lang('E-mail address')}" value="" class="">
                    </div>
                    <div class="layui-form-item">
                        
                        <input type="password"  name="password" lay-verify="required" autocomplete="off" placeholder="{:lang('Password')}" value="" class="">
                    </div>
                    <!-- <div class="layui-form-item" style="position: relative;">
                        <input type="text" name="captcha" id="captcha" lay-verify="required" placeholder="{:lang('Verification Code')}" autocomplete="off" class="layui-input text">
                        <div class="captcha" >
                            <img src="{:captcha_src()}" alt="captcha" onclick="this.src=this.src+'?'+'id='+Math.random()"/>
                        </div>
                    </div>  -->
                    <div class="layui-form-item">
                        
                        <div id="captcha"></div>
                    </div>
                    <div class="layui-form-item">
                        <button type="submit" class="layui-btn btn-submit btn-blog disabled" id="lp-pom-button-13" lay-submit lay-filter="login">{:lang('LOG IN')}</button>
                    </div>
                    <div class="layui-form-item" style="text-align: right;padding-right: 5px; color: #c1c1c1;font-size: 14px;">
                        <span>{:lang('No account?')}</span> <a href="{:url('user/register/index')}" style="color: #fff;">{:lang('Sign up')}</a>
                    </div>
                </form>
            </div>   
        </div>
    </div>
</div>

<div class="wap-main">
<div class="layui-col-xs12">
  <div class="">
      <img src="__STATIC__/user/images/da69f300-new-logo-full-size_0pk0530pk04k000009.PNG" width="100%">
  </div>
</div>
</div>

<script src="__STATIC__/plugins/drag/js/jquery-1.11.0.min.js"></script>
{include file="common/footer"/}
<!-- <link rel="stylesheet" href="__STATIC__/plugins/drag/css/htmleaf-demo.css">
 --><!-- <script src="__STATIC__/plugins/drag/js/drag.js"></script> -->
<script src="https://cdn.dingxiang-inc.com/ctu-group/captcha-ui/index.js"></script>

<script>
    layui.use('form',function(){
        var form = layui.form,$ = layui.jquery;
        //监听提交
        form.on('submit(login)', function(data){
            
            if($("#lp-pom-button-13").hasClass('disabled')){
                return false;
            }
            if($("#_captcha").val() != 1){
                layer.msg("{:lang('拖动滑块验证')}", {icon: 2, anim: 6, time: 1000});
                return false;
            }
            loading =layer.load(1, {shade: [0.1,'#fff'] });//0.1透明度的白色背景
            $.post('{:U("index/index")}',data.field,function(res){
                layer.close(loading);
                if(res.code == 1){
                    layer.msg(res.msg, {icon: 1, time: 1000}, function(){
                        location.href = res.url;
                    });
                }else{
                    $('#captcha').val('');
                    layer.msg(res.msg, {icon: 2, anim: 6, time: 1000});
                    $('.captcha img').attr('src','{:captcha_src()}?id='+Math.random());
                }
            });
            return false;
        });
         $("._changeLang").click(function(){
             var loading = layer.load(1, {shade: [0.1, '#fff']});
             $.post($(this).data('href'),{lang:$(this).data('lang')},function(res){
                layer.close(loading);
                location.reload();
             })
        })
         
    });
    //$('#drag').drags({name:"{:lang('Drag to Verify')}",success:"{:lang('Verify Successful')}"});
    
          (function()
          {
            var cap = $('#captcha')
            var form = cap.parents('form')
            _dx.Captcha(cap[0],
            {
              appId: '17edd2cfdf668d1aa0385504d297c7f7',
              type: 'basic',
              style: 'inline',
              language: 'en', // 语言为英语
              width: $(".beg-login-main").width()-30,
              success: function(token)
              {
                $("#_captcha").val(1);
                $("#lp-pom-button-13").removeClass('disabled');
              }
            })
          })()
        
</script>
</body>
</html>
